<%@page import="java.util.Vector"%>
<%@page import="member.MemberVo"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>modify.jsp</title>

<script>
function getId(id){return document.getElementById(id);}
function init(){
	getId('btnSubmit').onclick=function(){
		var p1=frm.newPwd1.value;
		var p2=frm.newPwd2.value;
	
		if(p1==p2){
			frm.action='index2.jsp?inc_content=./jsp/modify_result.jsp';
			frm.submit();
			
		}else{
			alert('새로운 암호가 서로 다릅니다. 똑바로~~~')
			
		}
	getId('btnCancel').onclick=function(){
		
	}	
	}	
}


</script>
</head>
<body>

	<jsp:useBean id="bean" class="member.Login" scope="page" />
	<jsp:setProperty property="*" name="bean" />
	
	<%MemberVo m=bean.view();%>

	<div body>
	<h1>회원정보 수정</h1>
	<form name='frm' method='post' action=''>
		<label>아이디</label> <input type="text" name='mid' value="<%=m.getMid()%>"><br />
		<label>기존암호</label> <input type="text" name='pwd' value="<%=m.getPwd()%>">
		<p />

		<label>새로운 암호</label> <input type="password" name='newPwd1' value=""><br />

		<label>[확인]</label><input type="password" name='newPwd2'>
		<p />

		<input type="button" value='수정' id='btnSubmit'> 
		<input type='button' value='취소' id='btnCancel'>

	</form>
	</div>
	<script>init();</script>
	

</body>
</html>